
package com.insigma.business.qrcode.soldier.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.CommonSignInfoDao;
import com.insigma.business.qrcode.soldier.dto.CommonSignInfoBSearcher;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.entity.CommonSignInfoDO;
import com.insigma.business.qrcode.soldier.service.CommonSignInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("commonSignInfoService")
public class CommonSignInfoServiceImpl implements CommonSignInfoService {

    @Autowired(required = false)
    private CommonSignInfoDao commonSignInfoDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<CommonSignInfoDO> search(final CommonSignInfoBSearcher commonSignInfoBSearcher) {
        return commonSignInfoDao.search(commonSignInfoBSearcher);
    }

    
    @Override
    public CommonSignInfoDO get(final String id) {
        return commonSignInfoDao.get(id);
    }

    
    @Override
    public Integer insert(final CommonSignInfoDO commonSignInfoDO) {
        commonSignInfoDO.setId(sequenceGenerator.genKey(SequenceNameConstant.COMMON_SIGN_INFO_ID));
        return commonSignInfoDao.insert(commonSignInfoDO);
    }

    
    @Override
    public Integer update(final CommonSignInfoDO commonSignInfoDO) {
        return commonSignInfoDao.update(commonSignInfoDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId) {
        return commonSignInfoDao.delete(id, modifierType, modifierId);
    }

    @Override
    public CommonSignInfoDO getBy(String type, String bizId, String idCardNo) {
        return commonSignInfoDao.getBy(type, bizId, idCardNo);
    }

}
